// 注册登陆表单共用校验配置

export const UserRules = {
    username: [
        { required: true, message: "用户账号必填", trigger: "blur" },
        {
            pattern: /^[\u4e00-\u9fa5a-zA-Z0-9_-]{5,10}$/,
            message: "5到10位(字母,数字,下划线,减号)",
            trigger: "blur",
        },
    ],
    password: [
        { required: true, message: "用户密码必填", trigger: "blur" },
        {
            pattern:
                /^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[.!@#$%^&*? ])\S*$/,
            message: "最少6位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符",
            trigger: "blur",
        },
    ],
}